package com.wengyingjian.weixin.controller;

import com.wengyingjian.weixin.common.model.WeixinRequstTextMessage;
import com.wengyingjian.weixin.dispatcher.WeixinTextResponseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wengyingjian on 16/12/27.
 */
@RestController
public class TestEntryController {

    @Autowired
    private WeixinTextResponseServiceImpl weixinTextResponseServiceImpl;

    @RequestMapping("/test")
    public String test(String msgId, String content) {
        WeixinRequstTextMessage msg = new WeixinRequstTextMessage();
        msg.setMsgId(msgId);
        msg.setContent(content);
        String resp = weixinTextResponseServiceImpl.doHandleMessage(msg);
        return resp;
    }
}
